#ifndef CURVESEDITORWINDOW_H
#define CURVESEDITORWINDOW_H

#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include <QScrollArea>
#include <QTabWidget>
#include <QToolBar>
#include <QToolButton>

QT_BEGIN_NAMESPACE
namespace Ui { class CurvesEditorWindow; }
QT_END_NAMESPACE

namespace CurveEditor {

class CurvesEditorWindow : public QMainWindow
{
    Q_OBJECT

public:
    CurvesEditorWindow(QWidget *parent = nullptr);
    ~CurvesEditorWindow();

protected:
    void closeEvent(QCloseEvent *event) override;

private:
    void createActions();
    void createMenus();
    void createToolBars();
    void createStatusBar();

    void manageActions();

    void showProjectTitle();

private slots:
    void fileNew();
    void fileOpen();
    void fileSave();
    void fileSaveAs();
    void fileShowPrintPage();
    void fileClose();
    void fileExit();

    void editUndo();
    void editRedo();
    void editCut();
    void editCopy();
    void editPaste();
    void editDelete();
    void editSelectAll();
    void editUnSelectAll();

    void viewGrid(bool);
    void viewMarkup(bool);
    void viewZoomIn();
    void viewZoomOut();
    void viewZoom1To1();
    void viewZoomToFit();

    void helpAbout();

    void tabCurrentChanged(int index);
    void tabCloseRequested(int index);
    void tabBarDoubleClicked(int index);

private:
    Ui::CurvesEditorWindow *ui;
    QMenu *fileMenu;
    QMenu *editMenu;
    QMenu *viewMenu;
    QMenu *helpMenu;

    QAction *fileNewAction;
    QAction *fileOpenAction;
    QAction *fileSaveAction;
    QAction *fileSaveAsAction;
    QAction *fileCloseAction;
    QAction *fileExitAction;
    QAction *filePrintAction;

    QAction *editUndoAction;
    QAction *editRedoAction;
    QAction *editCutAction;
    QAction *editCopyAction;
    QAction *editPasteAction;
    QAction *editDeleteAction;

    QAction *viewGridAction;
    QAction *viewMarkupAction;
    QAction *viewZoomInAction;
    QAction *viewZoomOutAction;
    QAction *viewZoom1To1Action;
    QAction *viewZoomToFitAction;

    QAction *helpAboutAction;


    QToolBar *fileToolBar;


    QTabWidget *m_projectPages;
};

} // CurveEditor

#endif // CURVESEDITORWINDOW_H
